home *** CD-ROM | disk | FTP | other *** search
/ MacHome 2001 January / MacHome Magazine Demo Disc January 2001.iso / mac / Software / Networking / InterMapper 3.0 - PPC.sea / InterMapper 3.0 - PPC / InterMapper™ 3.0-PPC / InterMapper™ 3.0-PPC.rsrc / PrTy_163_com.dartware.tcp.nntp < prev    next >
Encoding:
Text File  |  2000-07-24  |  1.8 KB  |  73 lines

  1. <!-- 
  2.     NNTP (com.dartware.tcp.nntp)
  3.     Copyright © 2000 Dartware, LLC. All rights reserved.
  4. -->
  5.  
  6. <header>
  7.     type            =     "tcp-script"
  8.     package            =     "com.dartware"
  9.     probe_name        =    "tcp.nntp"
  10.     human_name        =    "NNTP"
  11.     version            =     "1.1"
  12.     address_type    =     "IP"
  13.     port_number        =    "119"
  14.  
  15.     old_protocol    =     "8"            # Backward compat. with old numbering scheme.
  16.     old_script        =     "8006"
  17.  
  18. </header>
  19.  
  20. <description>
  21.  
  22. ≤GB≥Network News Transfer Protocol≤P≥
  23.  
  24. The protocol used to read network news on TCP/IP Internets, as defined in ≤U2≥RFC 977≤P0≥.  The default TCP port number for NNTP connections is port 119.
  25.  
  26. This script connects to the news server and uses the GROUP command to ask for information about a specific newsgroup name.  The script then issues the QUIT command to tell the server it is closing the connection.
  27.  
  28. ≤i≥Newsgroup≤p≥ is the name of the newsgroup that you want to verify.
  29.  
  30. </description>
  31.  
  32. <parameters>
  33.  
  34. "Newsgroup"        =    "alt.elvis.sighting"
  35.  
  36. </parameters>
  37.  
  38. <script>
  39.  
  40. CONN #60 (connect timeout in secs)
  41. WAIT #30 @IDLE (idle timeout in secs)
  42. DISC @DISCONNECT
  43. EXPT "20. "r else goto @UNEXPECTED_GREETING
  44. SEND "GROUP ${Newsgroup}\r\n"
  45. MTCH "211" else goto @NO_SUCH_GROUP
  46. SEND "QUIT\r\n"
  47. MTCH "205" #+1
  48. DONE OKAY
  49.  
  50. @DISCONNECT:
  51. DONE DOWN "[NNTP] Disconnected from port ${_REMOTEPORT} after ${_SECSCONNECTED} seconds."
  52.  
  53. @UNEXPECTED_GREETING:
  54. DONE DOWN "[NNTP] Unexpected greeting from port ${_REMOTEPORT}. (${_LINE:50})"
  55.  
  56. @NO_SUCH_GROUP:
  57. MTCH "411" else goto @INVALID_NAME
  58. SEND "QUIT\r\n"
  59. MTCH "205" #+1
  60. DONE WARN "[NNTP] No such group \"${Newsgroup}\""
  61.  
  62. @INVALID_NAME:
  63. MTCH "501" else goto @UNEXPECTED_RESPONSE
  64. DONE ALRM "[NNTP] \"${Newsgroup}\" is not a valid newsgroup name."
  65.  
  66. @UNEXPECTED_RESPONSE:
  67. DONE ALRM "[NNTP] Unexpected response to GROUP command. (${_LINE:50})"
  68.  
  69. @IDLE:
  70. DONE DOWN "[NNTP] No data for ${_IDLETIMEOUT} seconds.  Was expecting \"${_STRINGTOMATCH}\". [Line ${_IDLELINE}]"
  71.  
  72. </script>
  73.